<%@ page contentType="text/html; charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Title</title>
    <%@include file="../jsp/head.jsp" %>
    <script type="text/javascript" src="${ctx}/js/menuList.js"></script>
</head>
<body class="easyui-layout" data-options="border:false">
<div data-options="region:'west',split:true,title:'菜单列表'" style="width: 270px;">
    <ul id="menuTreeList"></ul>
</div>
<div data-options="region:'center',iconCls:'icon-ok'">
    <table id="menuTable"></table>
</div>
<div id="menuMenu" class="easyui-menu" style="width:120px;">
    <shiro:hasPermission name="caidanguanli:xinzengzicaidan">
        <div id="menu-add" data-options="iconCls:'icon-add'">新增子菜单</div>
    </shiro:hasPermission>
    <shiro:hasPermission name="caidanguanli:shanchucaidan">
        <div id="menu-remove" data-options="iconCls:'icon-remove'">删除菜单</div>
    </shiro:hasPermission>
    <shiro:hasPermission name="caidanguanli:tianjiagongnenganniu">
        <div id="menu-add-btns" data-options="iconCls:'icon-addn'">添加功能按钮</div>
    </shiro:hasPermission>
    <shiro:hasPermission name="caidanguanli:xiugaicaidanxinxi">
        <div id="menu-edit" data-options="iconCls:'icon-edit'">修改菜单信息</div>
    </shiro:hasPermission>
    <div data-options="iconCls:'icon-back'">退出菜单</div>
</div>
<div id="dialog-menu-edit" class="easyui-dialog"
     data-options="closed:true,modal:true,top:'20%'" style="width:300px;padding: 20px;">
    <form id="menu-form">
        <input id="id" name="id" type="hidden" value="">
        <input id="parentId" name="parentId" type="hidden" value="">
        <div style="margin-bottom:20px">
            <input class="easyui-textbox" name="menuName"
                   data-options="label:'名称',labelAlign:'right',labelWidth:60,required:true"
                   style="width:100%;height:32px">
        </div>
        <div style="margin-bottom:20px">
            <input class="easyui-textbox" name="menuUrl" data-options="label:'URL',labelAlign:'right',labelWidth:60"
                   style="width:100%;height:32px">
        </div>
    </form>
</div>
<div id="window-menu-add-btns" class="easyui-window"
     data-options="modal:true,width:600,height:400,closed:true">
    <div id="funcs-layout" class="easyui-layout" data-options="fit:true,border:false">
        <div data-options="region:'west',width:230">
            <ul id="all-btns" class="easyui-datalist" data-options="fit:true,border:false,title:'未添加按钮'"></ul>
        </div>
        <div class="padding-top-70" data-options="region:'center',title:'操作'">
            <p class="align-center margin-top-bottom-40">
                <button id="toLeft" class="easyui-linkbutton" iconCls="icon-left">向左</button>
            </p>
            <p class="align-center margin-top-bottom-40">
                <button id="toRight" class="easyui-linkbutton" iconCls="icon-right">向右</button>
            </p>
        </div>
        <div data-options="region:'east',width:230">
            <ul id="current-btns" class="easyui-datalist" data-options="fit:true,border:false,title:'当前菜单按钮'"></ul>
        </div>
    </div>
</div>
</body>
</html>
